package View.src;

import javax.swing.*;
import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.ResourceBundle;

//战斗//战斗
public class Batter extends JFrame {
    public Batter() {
        initComponents();
    }

    private void button1MousePressed(MouseEvent e) {
        // TODO add your code here
    }

    private void initComponents() {
        //ResourceBundle bundle = ResourceBundle.getBundle("Graph.ui");
        button1 = new JButton();
        label2 = new JLabel();
        label3 = new JLabel();
        scrollPane1 = new JScrollPane();
        textArea2 = new JTextArea();
        textField1 = new JTextField();
        textField2 = new JTextField();
        label1 = new JLabel();

        //======== this ========
        setTitle("\u6218\u6597");
        JPanel contentPane = (JPanel) getContentPane();
        contentPane.setLayout(null);

        //---- button1 ----
        button1.setIcon(new ImageIcon("petbag\\\u80cc\u5305\u84dd.png"));
        button1.addMouseListener(new MouseAdapter() {
            @Override
            public void mousePressed(MouseEvent e) {
                button1MousePressed(e);
            }
        });
        contentPane.add(button1);
        button1.setBounds(645, 365, 100, 70);

        //---- label2 ----
        label2.setText("Batte.label2.text");
        label2.setIcon(new ImageIcon("petbag\\\u95ea\u7535\u9e1f.png"));
        contentPane.add(label2);
        label2.setBounds(630, 0, 115, 90);

        //---- label3 ----
        label3.setIcon(new ImageIcon("petbag\\\u76ae\u5361\u4e18.png"));
        contentPane.add(label3);
        label3.setBounds(0, -5, 115, 90);

        //======== scrollPane1 ========
        {

            //---- textArea2 ----
            textArea2.setText("lll");
            scrollPane1.setViewportView(textArea2);
        }
        contentPane.add(scrollPane1);
        scrollPane1.setBounds(0, 235, 200, 200);

        //---- textField1 ----
        textField1.setBackground(Color.red);
        textField1.setText("100/100");
        textField1.setForeground(Color.black);
        contentPane.add(textField1);
        textField1.setBounds(115, 0, 195, textField1.getPreferredSize().height);

        //---- textField2 ----
        textField2.setBackground(Color.red);
        textField2.setText("100/100");
        textField2.setForeground(Color.black);
        contentPane.add(textField2);
        textField2.setBounds(440, 0, 195, textField2.getPreferredSize().height);

        //---- label1 ----
        label1.setIcon(new ImageIcon("petbag\\\u573a\u666f\u56fe5.jpg"));
        contentPane.add(label1);
        label1.setBounds(0, 0, 745, 435);

        {
            // compute preferred size
            Dimension preferredSize = new Dimension();
            for (int i = 0; i < contentPane.getComponentCount(); i++) {
                Rectangle bounds = contentPane.getComponent(i).getBounds();
                preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
                preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
            }
            Insets insets = contentPane.getInsets();
            preferredSize.width += insets.right;
            preferredSize.height += insets.bottom;
            contentPane.setMinimumSize(preferredSize);
            contentPane.setPreferredSize(preferredSize);
        }
        pack();
        setLocationRelativeTo(getOwner());
    }

    private JButton button1;
    private JLabel label2;
    private JLabel label3;
    private JScrollPane scrollPane1;
    private JTextArea textArea2;
    private JTextField textField1;
    private JTextField textField2;
    private JLabel label1;
}

